﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HOOMT
{
    class SystemVar
    {
        public static MainForm mainForm;
        //控制Mainform上图标工具条
        public static void ShowToolStrip(OriginalModelForm modelForm)
        {
            if (modelForm is ObjectModelForm)
            {
                mainForm.splitContainer3.Panel1.Controls.Remove(mainForm.stateTransitionsModelToolStrip);
                mainForm.splitContainer3.Panel1.Controls.Remove(mainForm.informationFlowModelToolStrip);
                mainForm.splitContainer3.Panel1.Controls.Add(mainForm.objectModelToolStrip);
            }
            else if (modelForm is StateTransitionModelForm)
            {
                mainForm.splitContainer3.Panel1.Controls.Remove(mainForm.informationFlowModelToolStrip);
                mainForm.splitContainer3.Panel1.Controls.Remove(mainForm.objectModelToolStrip);
                mainForm.splitContainer3.Panel1.Controls.Add(mainForm.stateTransitionsModelToolStrip);
            }
            else if (modelForm is InformationFlowModelForm)
            {
                mainForm.splitContainer3.Panel1.Controls.Remove(mainForm.objectModelToolStrip);
                mainForm.splitContainer3.Panel1.Controls.Remove(mainForm.stateTransitionsModelToolStrip);
                mainForm.splitContainer3.Panel1.Controls.Add(mainForm.informationFlowModelToolStrip);
            }
        }
    }
}
